import { reactive } from 'vue'
import {setStorage,getStorage} from "../utils/storage.ts";

export default ()=>{
    const userInfo = reactive({
        token:getStorage('token')
    })

    const setUserInfo = (data:any)=>{
        setStorage("token",data.token)
        userInfo.token = data.token
    }

    return {userInfo,setUserInfo}
}
